package demoHomework;

import java.util.ArrayList;

public class work06 {
	public static void main(String[] args) {
		int [] arr1= {1,2,3};
		int [] arr2 = {2,3,4,5};
		ArrayList<Integer> list = new ArrayList<>();
		for(Integer num1:arr1){
			list.add(num1);
		}
		for(Integer num2:arr2){
			list.add(num2);
		}
		System.out.println(list);
		for(Integer num1:arr1){
			for(Integer num2:arr2){
				if(num1==num2){
					list.remove(num1);
					list.remove(num2);
				}
			}
		}
		System.out.println(list);
	}
}
